/*
 * Yabumi, a 2d scrolling shoot-em-up game.
 * Copyright (C) 2003 Gemma Teruaki <terugen@yabumi.com>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
 */

#ifndef _HOMING_H_
#define _HOMING_H_

/* includes begin */ 
#ifndef _TASKMANAGER_H_
/* need task _option _tasklist */
#include "../taskmanager.h"
#endif
/* need SDL_Surface */
#include <SDL.h>
/* includes end */

/* constants begin */
#define HOMING_SPEED (15.0)
#define HOMING_ROTATE_SPEED (5)
#define HOMING_LIFETIME (200)
#define HOMING_COLLISION_DISTANCE (12)
#define HOMING_POWER (5)
/* constants end */

/* typedef begin */
typedef struct {
  int x, y;
  int dx, dy;
  int angle;
  /* _list_item *root; !!!circular reference!!! */
  void *root;
} _Homing;
/* typedef end */

/* Global Objects */
extern SDL_Surface *Sprite_Homing[3][360];
/* !!!circular reference!!! */
/* extern _list_header hitcircle_list_header; */

/* Prototypes from the homing.c file. */
void Homing_Init();
void Homing_Free();
_Homing *Homing_Create(int x, int y, int dx, int dy, int angle);
task Homing_Add(_option *optv);
task Homing_Move(_option *optv);
task Homing_Kill(_option *optv);
#endif
